﻿// 
// This file is part of WikiquoteScreensaverLib.
//
// WikiquoteScreensaverLib is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// WikiquoteScreensaverLib is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with WikiquoteScreensaverLib.  If not, see <http://www.gnu.org/licenses/>.
//
// Filename: TopicTranslation.cs
// Copyright: Christian Hanser 2008
//


using System;
using System.Globalization;
using System.Runtime.Serialization;

namespace WikiquoteScreensaverLib.Common
{
    [DataContract(Name = "TopicTranslation")]
    public sealed class TopicTranslation
    {
        [DataMember(Name = "Culture")]
        readonly CultureInfo _culture;
        [DataMember(Name = "Topic")]
        readonly string _topic;

        public TopicTranslation(CultureInfo culture, string topic)
        {
            _culture = culture;
            _topic = topic;
        }

        public CultureInfo Culture
        {
            get { return _culture; }
        }

        public string Topic
        {
            get { return _topic; }
        }

        public override string ToString()
        {
            return String.Format("{0} ({1})", _culture.NativeName, _topic);
        }
    }
}
